<%@ page language="java" contentType="text/html; charset=EUC-KR" pageEncoding="EUC-KR"%>
<%@ page import="performReservation.SMMDBBean"%>
<%@ page import="java.sql.*"%>
<%!
	String email = null;
	String address =null;
	String passwd = null;
	String cpasswd = null;
	String name = null;
	String nickname = null;
%>
<% request.setCharacterEncoding("euc-kr");%>
<jsp:useBean id="cus" scope="page" class="performReservation.Customer"/>
<%
	email = request.getParameter("email");
	passwd = request.getParameter("password");
	cpasswd =  request.getParameter("cpassword");
	name = request.getParameter("name");
	nickname = request.getParameter("nick");
	address = request.getParameter("address");
	if(passwd == ""|| cpasswd=="" ||name=="" || nickname == "" || address==""||email==""){
		%><center>
		Sorry! Please fill the blank;
	<input type="button" name="submit" value="return to last page!" onclick="javascript:history.back(-1);">
	</center>
	<%
	}else if(!passwd.equals(cpasswd)){
		%><center>
		Sorry! you input password is not same;
	<input type="button" name="submit" value="return to last page!" onclick="javascript:history.back(-1);">
	</center>
	<%
	}else{
		SMMDBBean mProcess = SMMDBBean.getInstance();
		cus.setEmail(email);
		cus.setPasswd(passwd);
		cus.setNickname(nickname);
		cus.setName(name);
		cus.setAddress(address);
		mProcess.modifyCustomer(cus);
		%><center>
		processing success,  information has changed
	</center>
	<%
	}
%>
